﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Net.Fan.SmallPig.DataAccess;

namespace Net.Fan.SmallPig.BusinessRules
{
    public class RiskBiz
    {
        static long times;

        public static void CheckRisks()
        {
            times++;
            //天干   O(∩_∩)O哈哈~
            if ((times % (10 * 10)) == 0)
            {
                RiskDA.CheckOverDue();
            }
            //地支
            else if (times % (12 * 12) == 0)
            {
                RiskDA.CheckDueSoon(5);
            }

            //-------------------
            //Random rd = new Random(DateTime.Now.Millisecond);
            //int i = rd.Next(0, 100);
            //if (i > 80)
            //{
            //    RiskDA.CheckOverDue();
            //}
            //else if (i > 60)
            //{
            //    RiskDA.CheckDueSoon(5);
            //}

        }
    }
}
